package util;

import entity.TableRecord;

public class TableRecordBuilder {
    private Integer id = null;

    private String dest = null;

    private String message = null;

    private String reply = null;

    private String status = null;

    public void addId(Integer id) {
        this.id = id;
    }

    public void addDest(String dest) {
        this.dest = dest;
    }

    public void addMessage(String message) {
        this.message= message;
    }

    public void addReply(String reply) {
        this.reply = reply;
    }

    public void addStatus(String status) {
        this.status = status;
    }

    public TableRecord getTableRecord() {
        return new TableRecord(id, dest, message, reply, status);
    }

    public void clone(TableRecord other) {
        this.id = other.getId();
        this.dest = other.getDest();
        this.message = other.getMessage();
        this.reply = other.getReply();
        this.status = other.getStatus();
    }

    public void fresh() {
        this.id = null;
        this.dest = null;
        this.message = null;
        this.reply = null;
        this.status = null;

    }

}
